package book;

//书柜
public class BookList {
    private Book[] books=new Book[10];
    private int bookNum;

    private int maxNum;
    //构造方法  初始化数据
    public BookList() {
        books[0] = new Book("三国演义","罗贯中",19.9,"小说");
        books[1] = new Book("西游记","吴承恩",29.9,"小说");
        books[2] = new Book("红楼梦","曹雪芹",39.9,"小说");
        books[3] = new Book("水浒传","施耐庵",49.9,"小说");
        maxNum = 10;
        bookNum = 4;
    }

    public Book getBook(int index) {
        return books[index];
    }


    public void setBook(Book book,int index) {
        this.books[index]=book;
    }

    public int getMaxNum() {
        return maxNum;
    }

    public void setMaxNum(int maxNum) {
        this.maxNum = maxNum;
    }

    public int getBookNum() {
        return bookNum;
    }

    public void setBookNum(int bookNum) {
        this.bookNum = bookNum;
    }
}
